home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / ColorSync 3.0 Mac SDK / Interfaces / CMICCProfile.a < prev    next >
Encoding:
Text File  |  1999-10-28  |  31.5 KB  |  793 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMICCProfile.a
  3. ;
  4. ;    Contains:    ICC Profile Format Definitions
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.5
  7. ;                Release:    ColorSync 3.0 SDK for use with Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1999 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  18. __CMICCPROFILE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.  
  24. ;  ICC Profile version constants  
  25.  
  26. cmICCProfileVersion2            EQU        $02000000
  27. cmICCProfileVersion21            EQU        $02100000
  28. cmCS2ProfileVersion                EQU        $02000000
  29. cmCS1ProfileVersion                EQU        $00000100            ; ColorSync 1.0 profile version 
  30. ;  Current Major version number 
  31.  
  32. cmProfileMajorVersionMask        EQU        $FF000000
  33. cmCurrentProfileMajorVersion    EQU        $02000000
  34. ;  magic cookie number for anonymous file ID 
  35.  
  36. cmMagicNumber                    EQU        'acsp'
  37.  
  38. ; ***********************************************************************
  39. ; *************** ColorSync 2.0 profile specification *******************
  40. ; ***********************************************************************
  41. ; *** flags field  ***
  42.  
  43. cmICCReservedFlagsMask            EQU        $0000FFFF            ; these bits of the flags field are defined and reserved by ICC 
  44. cmEmbeddedMask                    EQU        $00000001            ; if bit 0 is 0 then not embedded profile, if 1 then embedded profile 
  45. cmEmbeddedUseMask                EQU        $00000002            ; if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only 
  46. cmCMSReservedFlagsMask            EQU        $FFFF0000            ; these bits of the flags field are defined and reserved by CMS vendor 
  47. cmQualityMask                    EQU        $00030000            ; if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best 
  48. cmInterpolationMask                EQU        $00040000            ; if bit 18 is 0 then interpolation, if 1 then lookup only 
  49. cmGamutCheckingMask                EQU        $00080000            ; if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info 
  50. ;  copyright-protection flag options 
  51.  
  52. cmEmbeddedProfile                EQU        0                    ; 0 is not embedded profile, 1 is embedded profile 
  53. cmEmbeddedUse                    EQU        1                    ; 0 is to use anywhere, 1 is to use as embedded profile only 
  54. ;  speed and quality flag options 
  55.  
  56. cmNormalMode                    EQU        0                    ; it uses the least significent two bits in the high word of flag 
  57. cmDraftMode                        EQU        1                    ; it should be evaulated like this: right shift 16 bits first, mask off the 
  58. cmBestMode                        EQU        2                    ; high 14 bits, and then compare with the enum to determine the option value 
  59.  
  60. ; *** deviceAttributes fields ***
  61. ;  deviceAttributes[0] is defined by and reserved for device vendors 
  62. ;  deviceAttributes[1] is defined by and reserved for ICC 
  63. ;  The following bits of deviceAttributes[1] are currently defined 
  64.  
  65. cmReflectiveTransparentMask        EQU        $00000001            ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  66. cmGlossyMatteMask                EQU        $00000002            ; if bit 1 is 0 then glossy, if 1 then matte 
  67. ;  device/media attributes element values  
  68.  
  69. cmReflective                    EQU        0                    ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  70. cmGlossy                        EQU        1                    ; if bit 1 is 0 then glossy, if 1 then matte 
  71.  
  72. ; *** renderingIntent field ***
  73.  
  74. cmPerceptual                    EQU        0                    ; Photographic images 
  75. cmRelativeColorimetric            EQU        1                    ; Logo Colors 
  76. cmSaturation                    EQU        2                    ; Business graphics 
  77. cmAbsoluteColorimetric            EQU        3                    ; Logo Colors 
  78.  
  79.  
  80. ;  data type element values 
  81.  
  82. cmAsciiData                        EQU        0
  83. cmBinaryData                    EQU        1
  84. ;  screen encodings  
  85.  
  86. cmPrtrDefaultScreens            EQU        0                    ; Use printer default screens.  0 is false, 1 is ture 
  87. cmLinesPer                        EQU        1                    ; 0 is LinesPerCm, 1 is LinesPerInch 
  88. ;  2.0 tag type information 
  89.  
  90. cmNumHeaderElements                EQU        10
  91. ;  public tags 
  92.  
  93. cmAToB0Tag                        EQU        'A2B0'
  94. cmAToB1Tag                        EQU        'A2B1'
  95. cmAToB2Tag                        EQU        'A2B2'
  96. cmBlueColorantTag                EQU        'bXYZ'
  97. cmBlueTRCTag                    EQU        'bTRC'
  98. cmBToA0Tag                        EQU        'B2A0'
  99. cmBToA1Tag                        EQU        'B2A1'
  100. cmBToA2Tag                        EQU        'B2A2'
  101. cmCalibrationDateTimeTag        EQU        'calt'
  102. cmCharTargetTag                    EQU        'targ'
  103. cmCopyrightTag                    EQU        'cprt'
  104. cmDeviceMfgDescTag                EQU        'dmnd'
  105. cmDeviceModelDescTag            EQU        'dmdd'
  106. cmGamutTag                        EQU        'gamt'
  107. cmGrayTRCTag                    EQU        'kTRC'
  108. cmGreenColorantTag                EQU        'gXYZ'
  109. cmGreenTRCTag                    EQU        'gTRC'
  110. cmLuminanceTag                    EQU        'lumi'
  111. cmMeasurementTag                EQU        'meas'
  112. cmMediaBlackPointTag            EQU        'bkpt'
  113. cmMediaWhitePointTag            EQU        'wtpt'
  114. cmNamedColorTag                    EQU        'ncol'
  115. cmNamedColor2Tag                EQU        'ncl2'
  116. cmPreview0Tag                    EQU        'pre0'
  117. cmPreview1Tag                    EQU        'pre1'
  118. cmPreview2Tag                    EQU        'pre2'
  119. cmProfileDescriptionTag            EQU        'desc'
  120. cmProfileSequenceDescTag        EQU        'pseq'
  121. cmPS2CRD0Tag                    EQU        'psd0'
  122. cmPS2CRD1Tag                    EQU        'psd1'
  123. cmPS2CRD2Tag                    EQU        'psd2'
  124. cmPS2CRD3Tag                    EQU        'psd3'
  125. cmPS2CSATag                        EQU        'ps2s'
  126. cmPS2RenderingIntentTag            EQU        'ps2i'
  127. cmRedColorantTag                EQU        'rXYZ'
  128. cmRedTRCTag                        EQU        'rTRC'
  129. cmScreeningDescTag                EQU        'scrd'
  130. cmScreeningTag                    EQU        'scrn'
  131. cmTechnologyTag                    EQU        'tech'
  132. cmUcrBgTag                        EQU        'bfd '
  133. cmViewingConditionsDescTag        EQU        'vued'
  134. cmViewingConditionsTag            EQU        'view'
  135. ;  custom tags 
  136.  
  137. cmPS2CRDVMSizeTag                EQU        'psvm'
  138. cmVideoCardGammaTag                EQU        'vcgt'
  139. cmMakeAndModelTag                EQU        'mmod'
  140. ;  technology tag descriptions 
  141.  
  142. cmTechnologyFilmScanner            EQU        'fscn'
  143. cmTechnologyReflectiveScanner    EQU        'rscn'
  144. cmTechnologyInkJetPrinter        EQU        'ijet'
  145. cmTechnologyThermalWaxPrinter    EQU        'twax'
  146. cmTechnologyElectrophotographicPrinter EQU 'epho'
  147. cmTechnologyElectrostaticPrinter EQU    'esta'
  148. cmTechnologyDyeSublimationPrinter EQU    'dsub'
  149. cmTechnologyPhotographicPaperPrinter EQU 'rpho'
  150. cmTechnologyFilmWriter            EQU        'fprn'
  151. cmTechnologyVideoMonitor        EQU        'vidm'
  152. cmTechnologyVideoCamera            EQU        'vidc'
  153. cmTechnologyProjectionTelevision EQU    'pjtv'
  154. cmTechnologyCRTDisplay            EQU        'CRT '
  155. cmTechnologyPMDisplay            EQU        'PMD '
  156. cmTechnologyAMDisplay            EQU        'AMD '
  157. cmTechnologyPhotoCD                EQU        'KPCD'
  158. cmTechnologyPhotoImageSetter    EQU        'imgs'
  159. cmTechnologyGravure                EQU        'grav'
  160. cmTechnologyOffsetLithography    EQU        'offs'
  161. cmTechnologySilkscreen            EQU        'silk'
  162. cmTechnologyFlexography            EQU        'flex'
  163. ;  public type signatures 
  164.  
  165. cmSigCurveType                    EQU        'curv'
  166. cmSigDataType                    EQU        'data'
  167. cmSigDateTimeType                EQU        'dtim'
  168. cmSigLut16Type                    EQU        'mft2'
  169. cmSigLut8Type                    EQU        'mft1'
  170. cmSigMeasurementType            EQU        'meas'
  171. cmSigNamedColorType                EQU        'ncol'
  172. cmSigNamedColor2Type            EQU        'ncl2'
  173. cmSigProfileDescriptionType        EQU        'desc'
  174. cmSigScreeningType                EQU        'scrn'
  175. cmSigS15Fixed16Type                EQU        'sf32'
  176. cmSigSignatureType                EQU        'sig '
  177. cmSigTextType                    EQU        'text'
  178. cmSigU16Fixed16Type                EQU        'uf32'
  179. cmSigU1Fixed15Type                EQU        'uf16'
  180. cmSigUInt32Type                    EQU        'ui32'
  181. cmSigUInt64Type                    EQU        'ui64'
  182. cmSigUInt8Type                    EQU        'ui08'
  183. cmSigUnicodeTextType            EQU        'utxt'
  184. cmSigViewingConditionsType        EQU        'view'
  185. cmSigXYZType                    EQU        'XYZ '
  186. ;  custom type signatures 
  187.  
  188. cmSigVideoCardGammaType            EQU        'vcgt'
  189. cmSigMakeAndModelType            EQU        'mmod'
  190.  
  191. ;  Measurement type encodings 
  192. ;  Measurement Flare 
  193.  
  194. cmFlare0                        EQU        $00000000
  195. cmFlare100                        EQU        $00000001
  196. ;  Measurement Geometry    
  197.  
  198. cmGeometryUnknown                EQU        $00000000
  199. cmGeometry045or450                EQU        $00000001
  200. cmGeometry0dord0                EQU        $00000002
  201. ;  Standard Observer    
  202.  
  203. cmStdobsUnknown                    EQU        $00000000
  204. cmStdobs1931TwoDegrees            EQU        $00000001
  205. cmStdobs1964TenDegrees            EQU        $00000002
  206. ;  Standard Illuminant 
  207.  
  208. cmIlluminantUnknown                EQU        $00000000
  209. cmIlluminantD50                    EQU        $00000001
  210. cmIlluminantD65                    EQU        $00000002
  211. cmIlluminantD93                    EQU        $00000003
  212. cmIlluminantF2                    EQU        $00000004
  213. cmIlluminantD55                    EQU        $00000005
  214. cmIlluminantA                    EQU        $00000006
  215. cmIlluminantEquiPower            EQU        $00000007
  216. cmIlluminantF8                    EQU        $00000008
  217. ;  Spot Function Value 
  218.  
  219. cmSpotFunctionUnknown            EQU        0
  220. cmSpotFunctionDefault            EQU        1
  221. cmSpotFunctionRound                EQU        2
  222. cmSpotFunctionDiamond            EQU        3
  223. cmSpotFunctionEllipse            EQU        4
  224. cmSpotFunctionLine                EQU        5
  225. cmSpotFunctionSquare            EQU        6
  226. cmSpotFunctionCross                EQU        7
  227. ;  Color Space Signatures 
  228.  
  229. cmXYZData                        EQU        'XYZ '
  230. cmLabData                        EQU        'Lab '
  231. cmLuvData                        EQU        'Luv '
  232. cmYxyData                        EQU        'Yxy '
  233. cmRGBData                        EQU        'RGB '
  234. cmGrayData                        EQU        'GRAY'
  235. cmHSVData                        EQU        'HSV '
  236. cmHLSData                        EQU        'HLS '
  237. cmCMYKData                        EQU        'CMYK'
  238. cmCMYData                        EQU        'CMY '
  239. cmMCH5Data                        EQU        'MCH5'
  240. cmMCH6Data                        EQU        'MCH6'
  241. cmMCH7Data                        EQU        'MCH7'
  242. cmMCH8Data                        EQU        'MCH8'
  243. cm3CLRData                        EQU        '3CLR'
  244. cm4CLRData                        EQU        '4CLR'
  245. cm5CLRData                        EQU        '5CLR'
  246. cm6CLRData                        EQU        '6CLR'
  247. cm7CLRData                        EQU        '7CLR'
  248. cm8CLRData                        EQU        '8CLR'
  249. cmNamedData                        EQU        'NAME'
  250. ;  profileClass enumerations 
  251.  
  252. cmInputClass                    EQU        'scnr'
  253. cmDisplayClass                    EQU        'mntr'
  254. cmOutputClass                    EQU        'prtr'
  255. cmLinkClass                        EQU        'link'
  256. cmAbstractClass                    EQU        'abst'
  257. cmColorSpaceClass                EQU        'spac'
  258. cmNamedColorClass                EQU        'nmcl'
  259. ;  platform enumerations 
  260.  
  261. cmMacintosh                        EQU        'APPL'
  262. cmMicrosoft                        EQU        'MSFT'
  263. cmSolaris                        EQU        'SUNW'
  264. cmSiliconGraphics                EQU        'SGI '
  265. cmTaligent                        EQU        'TGNT'
  266. ;  ColorSync 1.0 elements 
  267.  
  268. cmCS1ChromTag                    EQU        'chrm'
  269. cmCS1TRCTag                        EQU        'trc '
  270. cmCS1NameTag                    EQU        'name'
  271. cmCS1CustTag                    EQU        'cust'
  272. ;  General element data types 
  273. CMDateTime                RECORD 0
  274. year                     ds.w    1                ; offset: $0 (0)
  275. month                     ds.w    1                ; offset: $2 (2)
  276. dayOfTheMonth             ds.w    1                ; offset: $4 (4)
  277. hours                     ds.w    1                ; offset: $6 (6)
  278. minutes                     ds.w    1                ; offset: $8 (8)
  279. seconds                     ds.w    1                ; offset: $A (10)
  280. sizeof                     EQU *                    ; size:   $C (12)
  281.                         ENDR
  282. CMFixedXYZColor            RECORD 0
  283. X                         ds.l    1                ; offset: $0 (0)
  284. Y                         ds.l    1                ; offset: $4 (4)
  285. Z                         ds.l    1                ; offset: $8 (8)
  286. sizeof                     EQU *                    ; size:   $C (12)
  287.                         ENDR
  288. ; typedef unsigned short                 CMXYZComponent
  289.  
  290. CMXYZColor                RECORD 0
  291. X                         ds.w    1                ; offset: $0 (0)
  292. Y                         ds.w    1                ; offset: $2 (2)
  293. Z                         ds.w    1                ; offset: $4 (4)
  294. sizeof                     EQU *                    ; size:   $6 (6)
  295.                         ENDR
  296. CM2Header                RECORD 0
  297. size                     ds.l    1                ; offset: $0 (0)        ;  This is the total size of the Profile 
  298. CMMType                     ds.l    1                ; offset: $4 (4)        ;  CMM signature,  Registered with CS2 consortium  
  299. profileVersion             ds.l    1                ; offset: $8 (8)        ;  Version of CMProfile format 
  300. profileClass             ds.l    1                ; offset: $C (12)        ;  input, display, output, devicelink, abstract, or color conversion profile type 
  301. dataColorSpace             ds.l    1                ; offset: $10 (16)        ;  color space of data 
  302. profileConnectionSpace     ds.l    1                ; offset: $14 (20)        ;  profile connection color space 
  303. dateTime                 ds        CMDateTime        ; offset: $18 (24)        ;  date and time of profile creation 
  304. CS2profileSignature         ds.l    1                ; offset: $24 (36)        ;  'acsp' constant ColorSync 2.0 file ID 
  305. platform                 ds.l    1                ; offset: $28 (40)        ;  primary profile platform, Registered with CS2 consortium 
  306. flags                     ds.l    1                ; offset: $2C (44)        ;  profile flags 
  307. deviceManufacturer         ds.l    1                ; offset: $30 (48)        ;  Registered with ICC consortium 
  308. deviceModel                 ds.l    1                ; offset: $34 (52)        ;  Registered with ICC consortium 
  309. deviceAttributes         ds.l    2                ; offset: $38 (56)        ;  Attributes[0] is for device vendors, [1] is for ICC 
  310. renderingIntent             ds.l    1                ; offset: $40 (64)        ;  preferred rendering intent of tagged object 
  311. white                     ds        CMFixedXYZColor ; offset: $44 (68)        ;  profile illuminant 
  312. creator                     ds.l    1                ; offset: $50 (80)        ;  profile creator 
  313. reserved                 ds.b    44                ; offset: $54 (84)        ;  reserved for future use 
  314. sizeof                     EQU *                    ; size:   $80 (128)
  315.                         ENDR
  316. CMTagRecord                RECORD 0
  317. tag                         ds.l    1                ; offset: $0 (0)        ;  Registered with CS2 consortium 
  318. elementOffset             ds.l    1                ; offset: $4 (4)        ;  Relative to start of CMProfile 
  319. elementSize                 ds.l    1                ; offset: $8 (8)
  320. sizeof                     EQU *                    ; size:   $C (12)
  321.                         ENDR
  322. CMTagElemTable            RECORD 0
  323. count                     ds.l    1                ; offset: $0 (0)
  324. tagList                     ds        CMTagRecord        ; offset: $4 (4) <-- really an array of length one ;  Variable size 
  325. sizeof                     EQU *                    ; size:   $10 (16)
  326.                         ENDR
  327. ;  External 0x02002001 CMProfile 
  328. CM2Profile                RECORD 0
  329. header                     ds        CM2Header        ; offset: $0 (0)
  330. tagTable                 ds        CMTagElemTable ; offset: $80 (128)
  331. elemData                 ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  Tagged element storage. Variable size 
  332.                          ORG 146
  333. sizeof                     EQU *                    ; size:   $92 (146)
  334.                         ENDR
  335. ; typedef struct CM2Profile *            CM2ProfilePtr
  336.  
  337. ; typedef CM2ProfilePtr *                CM2ProfileHandle
  338.  
  339. ;  Tag Type Definitions 
  340. CMCurveType                RECORD 0
  341. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'curv' 
  342. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  343. countValue                 ds.l    1                ; offset: $8 (8)        ;  number of entries in table that follows 
  344. data                     ds.w    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  345. sizeof                     EQU *                    ; size:   $E (14)
  346.                         ENDR
  347. CMDataType                RECORD 0
  348. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'data' 
  349. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  350. dataFlag                 ds.l    1                ; offset: $8 (8)        ;  0 = ASCII, 1 = binary 
  351. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  352.                          ORG 14
  353. sizeof                     EQU *                    ; size:   $E (14)
  354.                         ENDR
  355. CMDateTimeType            RECORD 0
  356. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'dtim' 
  357. reserved                 ds.l    1                ; offset: $4 (4)
  358. dateTime                 ds        CMDateTime        ; offset: $8 (8)
  359. sizeof                     EQU *                    ; size:   $14 (20)
  360.                         ENDR
  361. CMLut16Type                RECORD 0
  362. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft2' 
  363. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  364. inputChannels             ds.b    1                ; offset: $8 (8)        ;  Number of input channels 
  365. outputChannels             ds.b    1                ; offset: $9 (9)        ;  Number of output channels 
  366. gridPoints                 ds.b    1                ; offset: $A (10)        ;  Number of clutTable grid points 
  367. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  368. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  369. inputTableEntries         ds.w    1                ; offset: $30 (48)        ;  
  370. outputTableEntries         ds.w    1                ; offset: $32 (50)        ;  
  371. inputTable                 ds.w    1                ; offset: $34 (52) <-- really an array of length one ;  Variable size 
  372. CLUT                     ds.w    1                ; offset: $36 (54) <-- really an array of length one ;  Variable size 
  373. outputTable                 ds.w    1                ; offset: $38 (56) <-- really an array of length one ;  Variable size 
  374. sizeof                     EQU *                    ; size:   $3A (58)
  375.                         ENDR
  376. CMLut8Type                RECORD 0
  377. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft1' 
  378. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  379. inputChannels             ds.b    1                ; offset: $8 (8)        ;  
  380. outputChannels             ds.b    1                ; offset: $9 (9)        ;  
  381. gridPoints                 ds.b    1                ; offset: $A (10)        ;  
  382. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  383. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  384. inputTable                 ds.b    256                ; offset: $30 (48)        ;  fixed size of 256 
  385. CLUT                     ds.b    2                ; offset: $130 (304)    ;  Variable size 
  386. outputTable                 ds.b    256                ; offset: $132 (306)    ;  fixed size of 256 
  387. sizeof                     EQU *                    ; size:   $232 (562)
  388.                         ENDR
  389. CMMeasurementType        RECORD 0
  390. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'meas' 
  391. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  392. standardObserver         ds.l    1                ; offset: $8 (8)        ;  0 : unknown, 1 : CIE 1931, 2 : CIE 1964 
  393. backingXYZ                 ds        CMFixedXYZColor ; offset: $C (12)        ;  absolute XYZ values of backing 
  394. geometry                 ds.l    1                ; offset: $18 (24)        ;  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 
  395. flare                     ds.l    1                ; offset: $1C (28)        ;  0 : 0%, 1 : 100% flare 
  396. illuminant                 ds.l    1                ; offset: $20 (32)        ;  standard illuminant 
  397. sizeof                     EQU *                    ; size:   $24 (36)
  398.                         ENDR
  399. CMNamedColorType        RECORD 0
  400. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncol' 
  401. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  402. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  
  403. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  404. prefixName                 ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  Variable size, max = 32, to access fields after this one, have to count bytes 
  405. suffixName                 ds.b    1                ; offset: $11 (17) <-- really an array of length one ;  Variable size, max = 32 
  406. data                     ds.b    1                ; offset: $12 (18) <-- really an array of length one ;  varaible size data as explained below 
  407.                          ORG 20
  408. sizeof                     EQU *                    ; size:   $14 (20)
  409.                         ENDR
  410. ;     
  411. ;    A variable size array of structs appears as the last block of data
  412. ;    in the above struct, CMNamedColorType.  The data structure
  413. ;    is as follows: (example in C)
  414. ;    
  415. ;    struct {                                             
  416. ;        unsigned char    rootName[1];                 * Variable size, max = 32 
  417. ;        unsigned char    colorCoords[1];                 * Variable size  
  418. ;    } colorName[1];                                     * Variable size  
  419. ;
  420.  
  421. CMNamedColor2Type        RECORD 0
  422. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncl2' 
  423. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  424. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  lower 16 bits reserved for ICC use 
  425. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  426. deviceChannelCount         ds.l    1                ; offset: $10 (16)        ;  number of device channels, 0 indicates no device value available 
  427. prefixName                 ds.b    32                ; offset: $14 (20)        ;  32 byte field.  7 bit ASCII null terminated 
  428. suffixName                 ds.b    32                ; offset: $34 (52)        ;  32 byte field.  7 bit ASCII null terminated 
  429. data                     ds.b    1                ; offset: $54 (84) <-- really an array of length one ;  varaible size data as definced below 
  430.                          ORG 86
  431. sizeof                     EQU *                    ; size:   $56 (86)
  432.                         ENDR
  433. CMNamedColor2EntryType    RECORD 0
  434. rootName                 ds.b    32                ; offset: $0 (0)        ;  32 byte field.  7 bit ASCII null terminated 
  435. PCSColorCoords             ds.w    3                ; offset: $20 (32)        ;  Lab or XYZ color 
  436. DeviceColorCoords         ds.w    1                ; offset: $26 (38) <-- really an array of length one ;  Variable size 
  437. sizeof                     EQU *                    ; size:   $28 (40)
  438.                         ENDR
  439. CMTextDescriptionType    RECORD 0
  440. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'desc' 
  441. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  442. ASCIICount                 ds.l    1                ; offset: $8 (8)        ;  the count of "bytes" 
  443. ASCIIName                 ds.b    2                ; offset: $C (12)        ;  Variable size, to access fields after this one, have to count bytes 
  444. UniCodeCode                 ds.l    1                ; offset: $E (14)
  445. UniCodeCount             ds.l    1                ; offset: $12 (18)        ;  the count of characters, each character has two bytes 
  446. UniCodeName                 ds.b    2                ; offset: $16 (22)        ;  Variable size 
  447. ScriptCodeCode             ds.w    1                ; offset: $18 (24)
  448. ScriptCodeCount             ds.b    1                ; offset: $1A (26)        ;  the count of "bytes" 
  449. ScriptCodeName             ds.b    2                ; offset: $1B (27)        ;  Variable size 
  450.                          ORG 30
  451. sizeof                     EQU *                    ; size:   $1E (30)
  452.                         ENDR
  453. CMTextType                RECORD 0
  454. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'text' 
  455. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  456. text                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  457.                          ORG 10
  458. sizeof                     EQU *                    ; size:   $A (10)
  459.                         ENDR
  460. CMUnicodeTextType        RECORD 0
  461. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'utxt' 
  462. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  463. text                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  464. sizeof                     EQU *                    ; size:   $A (10)
  465.                         ENDR
  466. CMScreeningType            RECORD 0
  467. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'scrn' 
  468. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  469. screeningFlag             ds.l    1                ; offset: $8 (8)        ;  bit 0 : use printer default screens, bit 1 : inch/cm 
  470. channelCount             ds.l    1                ; offset: $C (12)
  471. data                     ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  varaible size data as explained below 
  472.                          ORG 18
  473. sizeof                     EQU *                    ; size:   $12 (18)
  474.                         ENDR
  475. ;    A variable size array of structs appears as the last block of data
  476. ;    in the above struct, CMScreeningType.  The data structure
  477. ;    is as follows: (example in C)
  478. ;    
  479. ;    struct {
  480. ;        Fixed            frequency;
  481. ;        Fixed            angle;
  482. ;        unsigned long    sportFunction;
  483. ;     }    channelScreening[1];                        * Variable size 
  484. ;
  485.  
  486. CMSignatureType            RECORD 0
  487. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sig ' 
  488. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  489. signature                 ds.l    1                ; offset: $8 (8)
  490. sizeof                     EQU *                    ; size:   $C (12)
  491.                         ENDR
  492. CMS15Fixed16ArrayType    RECORD 0
  493. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sf32' 
  494. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  495. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  496. sizeof                     EQU *                    ; size:   $C (12)
  497.                         ENDR
  498. CMU16Fixed16ArrayType    RECORD 0
  499. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'uf32' 
  500. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  501. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  502. sizeof                     EQU *                    ; size:   $C (12)
  503.                         ENDR
  504. CMUInt16ArrayType        RECORD 0
  505. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui16' 
  506. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  507. value                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  508. sizeof                     EQU *                    ; size:   $A (10)
  509.                         ENDR
  510. CMUInt32ArrayType        RECORD 0
  511. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui32' 
  512. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  513. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  514. sizeof                     EQU *                    ; size:   $C (12)
  515.                         ENDR
  516. CMUInt64ArrayType        RECORD 0
  517. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui64' 
  518. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  519. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size (x2) 
  520. sizeof                     EQU *                    ; size:   $C (12)
  521.                         ENDR
  522. CMUInt8ArrayType        RECORD 0
  523. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui08' 
  524. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  525. value                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  526.                          ORG 10
  527. sizeof                     EQU *                    ; size:   $A (10)
  528.                         ENDR
  529. CMViewingConditionsType    RECORD 0
  530. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'view' 
  531. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  532. illuminant                 ds        CMFixedXYZColor ; offset: $8 (8)        ;  absolute XYZs of illuminant  in cd/m^2 
  533. surround                 ds        CMFixedXYZColor ; offset: $14 (20)        ;  absolute XYZs of surround in cd/m^2 
  534. stdIlluminant             ds.l    1                ; offset: $20 (32)        ;  see definitions of std illuminants 
  535. sizeof                     EQU *                    ; size:   $24 (36)
  536.                         ENDR
  537. CMXYZType                RECORD 0
  538. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'XYZ ' 
  539. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  540. XYZ                         ds        CMFixedXYZColor ; offset: $8 (8) <-- really an array of length one ;  variable size XYZ tristimulus values 
  541. sizeof                     EQU *                    ; size:   $14 (20)
  542.                         ENDR
  543. ;  Profile sequence description type 
  544. CMProfileSequenceDescType RECORD 0
  545. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'pseq ' 
  546. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  547. count                     ds.l    1                ; offset: $8 (8)        ;  Number of descriptions 
  548. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  varaible size data as explained below 
  549.                          ORG 14
  550. sizeof                     EQU *                    ; size:   $E (14)
  551.                         ENDR
  552. ;    A variable size array of structs appears as the last block of data
  553. ;    in the above struct, CMProfileSequenceDescType.  The data structure
  554. ;    is as follows: (example in C)
  555. ;    
  556. ;    struct {                                             
  557. ;        OSType            deviceMfg;                     * Device Manufacturer 
  558. ;        OSType            deviceModel;                 * Decvice Model 
  559. ;        unsigned long    attributes[2];                 * Device attributes 
  560. ;        OSType            technology;                     * Technology signature 
  561. ;        unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  562. ;        unsigned char    mfgDescASCIIName[2];         * Variable size 
  563. ;        unsigned long    mfgDescUniCodeCode;             
  564. ;        unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  565. ;        unsigned char    mfgDescUniCodeName[2];         * Variable size 
  566. ;        unsigned long    mfgDescScriptCodeCode;         
  567. ;        unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  568. ;        unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  569. ;        unsigned long    modelDescASCIICount;         * the count of "bytes" 
  570. ;        unsigned char    modelDescASCIIName[2];         * Variable size 
  571. ;        unsigned long    modelDescUniCodeCode;         
  572. ;        unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  573. ;        unsigned char    modelDescUniCodeName[2];     * Variable size 
  574. ;        short            modelDescScriptCodeCode;     
  575. ;        unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  576. ;        SInt8            filler;                         * For proper alignment across languages 
  577. ;        unsigned char    modelDescScriptCodeName[2];     * Variable size 
  578. ;    }    profileDescription[1];                         
  579. ;
  580.  
  581.  
  582. ;  Under color removal, black generation type 
  583. CMUcrBgType                RECORD 0
  584. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'bfd  ' 
  585. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  586. ucrCount                 ds.l    1                ; offset: $8 (8)        ;  Number of UCR entries 
  587. ucrValues                 ds.w    1                ; offset: $C (12) <-- really an array of length one ;  variable size 
  588. bgCount                     ds.l    1                ; offset: $E (14)        ;  Number of BG entries 
  589. bgValues                 ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  variable size 
  590. ucrbgASCII                 ds.b    1                ; offset: $14 (20) <-- really an array of length one ;  null terminated ASCII string 
  591.                          ORG 22
  592. sizeof                     EQU *                    ; size:   $16 (22)
  593.                         ENDR
  594. CMIntentCRDVMSize        RECORD 0
  595. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  rendering intent 
  596. VMSize                     ds.l    1                ; offset: $4 (4)        ;  VM size taken up by the CRD 
  597. sizeof                     EQU *                    ; size:   $8 (8)
  598.                         ENDR
  599. CMPS2CRDVMSizeType        RECORD 0
  600. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'psvm' 
  601. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  602. count                     ds.l    1                ; offset: $8 (8)        ;  number of intent entries 
  603. intentCRD                 ds        CMIntentCRDVMSize ; offset: $C (12) <-- really an array of length one ;  variable size 
  604. sizeof                     EQU *                    ; size:   $14 (20)
  605.                         ENDR
  606. ;  Video Card Gamma type 
  607.  
  608. cmVideoCardGammaTableType        EQU        0
  609. cmVideoCardGammaFormulaType        EQU        1
  610.  
  611. CMVideoCardGammaTable    RECORD 0
  612. channels                 ds.w    1                ; offset: $0 (0)        ;  # of gamma channels (1 or 3) 
  613. entryCount                 ds.w    1                ; offset: $2 (2)        ;  1-based number of entries per channel 
  614. entrySize                 ds.w    1                ; offset: $4 (4)        ;  size on bytes of each entry 
  615. data                     ds.b    1                ; offset: $6 (6) <-- really an array of length one ;  variable size data follows 
  616.                          ORG 8
  617. sizeof                     EQU *                    ; size:   $8 (8)
  618.                         ENDR
  619. CMVideoCardGammaFormula    RECORD 0
  620. redGamma                 ds.l    1                ; offset: $0 (0)        ;  must be > 0.0 
  621. redMin                     ds.l    1                ; offset: $4 (4)        ;  must be > 0.0 and < 1.0 
  622. redMax                     ds.l    1                ; offset: $8 (8)        ;  must be > 0.0 and < 1.0 
  623. greenGamma                 ds.l    1                ; offset: $C (12)        ;  must be > 0.0 
  624. greenMin                 ds.l    1                ; offset: $10 (16)        ;  must be > 0.0 and < 1.0 
  625. greenMax                 ds.l    1                ; offset: $14 (20)        ;  must be > 0.0 and < 1.0 
  626. blueGamma                 ds.l    1                ; offset: $18 (24)        ;  must be > 0.0 
  627. blueMin                     ds.l    1                ; offset: $1C (28)        ;  must be > 0.0 and < 1.0 
  628. blueMax                     ds.l    1                ; offset: $20 (32)        ;  must be > 0.0 and < 1.0 
  629. sizeof                     EQU *                    ; size:   $24 (36)
  630.                         ENDR
  631. CMVideoCardGamma        RECORD 0
  632. tagType                     ds.l    1                ; offset: $0 (0)
  633. table                     ds        CMVideoCardGammaTable ; offset: $4 (4)
  634.                          ORG 4
  635. formula                     ds        CMVideoCardGammaFormula ; offset: $4 (4)
  636. sizeof                     EQU *                    ; size:   $28 (40)
  637.                         ENDR
  638. CMVideoCardGammaType    RECORD 0
  639. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'vcgt' 
  640. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  641. gamma                     ds        CMVideoCardGamma ; offset: $8 (8)
  642. sizeof                     EQU *                    ; size:   $30 (48)
  643.                         ENDR
  644. CMMakeAndModel            RECORD 0
  645. manufacturer             ds.l    1                ; offset: $0 (0)
  646. model                     ds.l    1                ; offset: $4 (4)
  647. serialNumber             ds.l    1                ; offset: $8 (8)
  648. manufactureDate             ds.l    1                ; offset: $C (12)
  649. reserved1                 ds.l    1                ; offset: $10 (16)        ;  fill with 0x00 
  650. reserved2                 ds.l    1                ; offset: $14 (20)        ;  fill with 0x00 
  651. reserved3                 ds.l    1                ; offset: $18 (24)        ;  fill with 0x00 
  652. reserved4                 ds.l    1                ; offset: $1C (28)        ;  fill with 0x00 
  653. sizeof                     EQU *                    ; size:   $20 (32)
  654.                         ENDR
  655. CMMakeAndModelType        RECORD 0
  656. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mmod' 
  657. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  658. makeAndModel             ds        CMMakeAndModel ; offset: $8 (8)
  659. sizeof                     EQU *                    ; size:   $28 (40)
  660.                         ENDR
  661. ; ***********************************************************************
  662. ; *************** ColorSync 1.0 profile specification *******************
  663. ; ***********************************************************************
  664.  
  665. cmGrayResponse                    EQU        0
  666. cmRedResponse                    EQU        1
  667. cmGreenResponse                    EQU        2
  668. cmBlueResponse                    EQU        3
  669. cmCyanResponse                    EQU        4
  670. cmMagentaResponse                EQU        5
  671. cmYellowResponse                EQU        6
  672. cmUcrResponse                    EQU        7
  673. cmBgResponse                    EQU        8
  674. cmOnePlusLastResponse            EQU        9
  675.  
  676. ;  Device types 
  677.  
  678. cmMonitorDevice                    EQU        'mntr'
  679. cmScannerDevice                    EQU        'scnr'
  680. cmPrinterDevice                    EQU        'prtr'
  681.  
  682. CMIString                RECORD 0
  683. theScript                 ds.w    1                ; offset: $0 (0)
  684. theString                 ds        Str63            ; offset: $2 (2)
  685. sizeof                     EQU *                    ; size:   $42 (66)
  686.                         ENDR
  687. ;  Profile options 
  688.  
  689. cmPerceptualMatch                EQU        $0000                ; Default. For photographic images 
  690. cmColorimetricMatch                EQU        $0001                ; Exact matching when possible 
  691. cmSaturationMatch                EQU        $0002                ; For solid colors 
  692. ;  Profile flags 
  693.  
  694. cmNativeMatchingPreferred        EQU        $00000001            ; Default to native not preferred 
  695. cmTurnOffCache                    EQU        $00000002            ; Default to turn on CMM cache 
  696. ; typedef long                             CMMatchOption
  697.  
  698. ; typedef long                             CMMatchFlag
  699.  
  700. CMHeader                RECORD 0
  701. size                     ds.l    1                ; offset: $0 (0)
  702. CMMType                     ds.l    1                ; offset: $4 (4)
  703. applProfileVersion         ds.l    1                ; offset: $8 (8)
  704. dataType                 ds.l    1                ; offset: $C (12)
  705. deviceType                 ds.l    1                ; offset: $10 (16)
  706. deviceManufacturer         ds.l    1                ; offset: $14 (20)
  707. deviceModel                 ds.l    1                ; offset: $18 (24)
  708. deviceAttributes         ds.l    2                ; offset: $1C (28)
  709. profileNameOffset         ds.l    1                ; offset: $24 (36)
  710. customDataOffset         ds.l    1                ; offset: $28 (40)
  711. flags                     ds.l    1                ; offset: $2C (44)
  712. options                     ds.l    1                ; offset: $30 (48)
  713. white                     ds        CMXYZColor        ; offset: $34 (52)
  714. black                     ds        CMXYZColor        ; offset: $3A (58)
  715. sizeof                     EQU *                    ; size:   $40 (64)
  716.                         ENDR
  717. CMProfileChromaticities    RECORD 0
  718. red                         ds        CMXYZColor        ; offset: $0 (0)
  719. green                     ds        CMXYZColor        ; offset: $6 (6)
  720. blue                     ds        CMXYZColor        ; offset: $C (12)
  721. cyan                     ds        CMXYZColor        ; offset: $12 (18)
  722. magenta                     ds        CMXYZColor        ; offset: $18 (24)
  723. yellow                     ds        CMXYZColor        ; offset: $1E (30)
  724. sizeof                     EQU *                    ; size:   $24 (36)
  725.                         ENDR
  726. CMProfileResponse        RECORD 0
  727. counts                     ds.w    9                ; offset: $0 (0)
  728. data                     ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  Variable size 
  729. sizeof                     EQU *                    ; size:   $14 (20)
  730.                         ENDR
  731. CMProfile                RECORD 0
  732. header                     ds        CMHeader        ; offset: $0 (0)
  733. profile                     ds        CMProfileChromaticities ; offset: $40 (64)
  734. response                 ds        CMProfileResponse ; offset: $64 (100)
  735. profileName                 ds        CMIString        ; offset: $78 (120)
  736. customData                 ds.b    1                ; offset: $BA (186) <-- really an array of length one ;  Variable size 
  737.                          ORG 188
  738. sizeof                     EQU *                    ; size:   $BC (188)
  739.                         ENDR
  740. ; typedef struct CMProfile *            CMProfilePtr
  741.  
  742. ; typedef CMProfilePtr *                CMProfileHandle
  743.  
  744.     IF OLDROUTINENAMES THEN
  745.  
  746. kCMApplProfileVersion            EQU        $00000100
  747.  
  748. grayResponse                    EQU        0
  749. redResponse                        EQU        1
  750. greenResponse                    EQU        2
  751. blueResponse                    EQU        3
  752. cyanResponse                    EQU        4
  753. magentaResponse                    EQU        5
  754. yellowResponse                    EQU        6
  755. ucrResponse                        EQU        7
  756. bgResponse                        EQU        8
  757. onePlusLastResponse                EQU        9
  758.  
  759. rgbData                            EQU        'RGB '
  760. cmykData                        EQU        'CMYK'
  761. grayData                        EQU        'GRAY'
  762. xyzData                            EQU        'XYZ '
  763.  
  764. monitorDevice                    EQU        'mntr'
  765. scannerDevice                    EQU        'scnr'
  766. printerDevice                    EQU        'prtr'
  767. ; typedef unsigned short                 XYZComponent
  768.  
  769. XYZColor                RECORD 0
  770. f                         ds        CMXYZColor
  771. sizeof                     EQU *                    ; size:   $6 (6)
  772.                         ENDR
  773.  
  774.  
  775. ; typedef unsigned short                 CMResponseData
  776.  
  777. IString                    RECORD 0
  778. f                         ds        CMIString
  779. sizeof                     EQU *                    ; size:   $42 (66)
  780.                         ENDR
  781.  
  782.  
  783. ; typedef long                             CMResponseColor
  784.  
  785. ; typedef CMResponseColor                 responseColor
  786.  
  787.     ENDIF    ; OLDROUTINENAMES
  788.  
  789.     ENDIF ; __CMICCPROFILE__ 
  790.  
  791.